package com.yyfax.pay.config.data.dao;

import java.util.List;

import com.yyfax.pay.config.model.po.PaymentRoutePO;

/**
 * 商户银行支付路由信息
 * 
 * @author changxd
 * @date 2017-04-13
 * @since 1.0.0
 */
public interface PaymentRouteDao {

	/**
	 * 插入商户银行支付路由信息
	 * 
	 * @author changxd
	 * @date 2017-04-13
	 * @since 1.0.0
	 * @param config
	 * @return
	 */
	public int insert(PaymentRoutePO config) throws Exception;

	/**
	 * 修改商户银行支付路由信息
	 * 
	 * @author changxd
	 * @date 2017-04-13
	 * @since 1.0.0
	 * @param config
	 * @return
	 */
	public int update(PaymentRoutePO config) throws Exception;

	/**
	 * 根据ID商户银行支付路由信息
	 * 
	 * @author changxd
	 * @date 2017-04-13
	 * @since 1.0.0
	 * @param id
	 * @return
	 */
	public PaymentRoutePO selectById(int id) throws Exception;

	/**
	 * 查询所有商户银行支付路由信息
	 * 
	 * @author changxd
	 * @date 2017-04-13
	 * @since 1.0.0
	 * @return
	 */
	public List<PaymentRoutePO> selectByMerchantCode(String merchantCode) throws Exception;

	/**
	 * 根据商户编号和银行编号查询所有商户银行支付路由信息
	 * 
	 * @author changxd
	 * @date 2017-04-13
	 * @since 1.0.0
	 * @param merchantCode
	 * @param bankCode
	 * @return
	 */
	public PaymentRoutePO selectByBankCode(String merchantCode, String bankCode) throws Exception;

	/**
	 * 查询所有商户银行支付路由信息
	 * 
	 * @author changxd
	 * @date 2017-04-13
	 * @since 1.0.0
	 * @param merchantCode
	 * @param bankCode
	 * @return
	 */
	public List<PaymentRoutePO> selectForList() throws Exception;

	/**
	 * 根据商户编号、主体和支付模式查询所有商户银行支付路由信息
	 */
	public List<PaymentRoutePO> selectByMerchantCodeAndPayModeAndSubjectType(String merchantCode, String payMode, String subjectType) throws Exception;

}
